#ifndef __SK_LED_H__
#define __SK_LED_H__

#include <stddef.h>
#include <stdint.h>

#ifdef __cplusplus
extern "C" {
#endif

enum skled_model {
    SK9816 = 0,
    SK_MODEL_LAST
};

enum skled_color {
    SKLED_RED = 0,
    SKLED_GREEN,
    SKLED_BLUE
};

struct skled;

int skled_create(struct skled **sk, enum skled_model model, uint8_t led_numbers, const char *spi_dev);
void skled_destroy(struct skled *sk);

int skled_set_rgb(struct skled *sk, uint8_t led_index, uint8_t red, uint8_t green, uint8_t blue);
int skled_set_rgb_gain(struct skled *sk, uint8_t rgain, uint8_t ggain, uint8_t bgain);

#ifdef __cplusplus
}
#endif
#endif
